﻿using Castle.Core.Logging;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace WebAppHappyNewYear.Filter
{
    public class CustomResultFilterAttribute : Attribute, IResultFilter, IFilterMetadata,IOrderedFilter
    {
        public int Order { get; set; }

        public void OnResultExecuted(ResultExecutedContext context)
        {
            Console.WriteLine($"{nameof(CustomResultFilterAttribute)} {context.HttpContext.Request} OnResultExecuted ");
        }

        public void OnResultExecuting(ResultExecutingContext context)
        {
            Console.WriteLine($"{nameof(CustomResultFilterAttribute)} {context.HttpContext.Request} OnResultExecuting ");
        }
    }
}
